package test.serverframe.armc.server.manager.ribbon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * @Description
 * @Author LSY
 * @Date 2018/10/15 15:56
 * @ClassName test.serverframe.armc.server.manager.ribbon.HelloServie
 */
@Service
public class HelloServie {
    @Autowired
    RestTemplate restTemplate;

    /**
     * @Descripttion 消费service-hi服务的“/hi”接口
     * @Author Best
     * @Date 2018/9/20 17:17
     * @Param [name]
     * @Return
     **/
    public String hiService(String name) {
        return restTemplate.getForObject("http://SERVICE-HI/hi?name=" + name, String.class);
    }
}
